Use the IEC power symbols for GtkSwitch labels
authorEmmanuele Bassi <ebassi@gnome.org>
Fri, 11 Jan 2019 15:21:09 +0000 (15:21 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Fri, 11 Jan 2019 15:25:30 +0000 (15:25 +0000)
Unicode 9.0 introduced glyps for the "on" and "off" power states, in the
form of:

 - U+23FD POWER ON SYMBOL, or ⏽
 - U+2B58 HEAVY CIRCLE, or ⭘

With `HEAVY CIRCLE` as "power off symbol" selected to avoid adding yet
another circle to the standard.

Since we moved GtkSwitch to always show glyphs instead of (translatable)
strings, asking the localisation teams to either come up with a suitable
short string to replace the English "ON" and "OFF", or to fall back to
Unicode glyphs, we should ensure we're using the appropriate symbols to
begin with.

See also: gtk!503 for the corresponding gtk-3-24 change.

gtk/gtkswitch.c

index 0426fc1997e6a82eab1b73979b16c2351d1d370d..abc37ab8637a56aceb7954ccf06b1b763f34ae9b 100644 (file)
@@ -639,10 +639,10 @@ gtk_switch_init (GtkSwitch *self)
   gtk_widget_add_controller (GTK_WIDGET (self), GTK_EVENT_CONTROLLER (gesture));
   priv->pan_gesture = gesture;
 
-  priv->on_label = gtk_label_new ("â\9d\99");
+  priv->on_label = gtk_label_new ("â\8f½");
   gtk_widget_set_parent (priv->on_label, GTK_WIDGET (self));
 
-  priv->off_label = gtk_label_new ("â\97\8b");
+  priv->off_label = gtk_label_new ("â­\98");
   gtk_widget_set_parent (priv->off_label, GTK_WIDGET (self));
 
   priv->slider = gtk_gizmo_new ("slider", NULL, NULL, NULL);